<div class="layui-card">
    <div class="layui-card-body">
        <form class="layui-form" action=""  method="post" id="cp-form">
            <div class="layui-form-item">
                <label class="layui-form-label">标题 <span class="request-tips">*</span></label>
                <div class="layui-input-block">
                    <script id="container" type="text/plain" name="title" >{$quest.title|raw}</script>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">选项 <span class="request-tips">*</span></label>
                <div class="layui-input-block">
                    <script id="option" type="text/plain" name="option" >{$quest.option|raw}</script>
                    <div class="layui-form-mid layui-word-aux">请用双斜杠 “//” 隔开,请按照26个英文字母排序</div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">解析</label>
                <div class="layui-input-block">
                    <script id="parse" type="text/plain" name="parse" >{$quest.parse|raw}</script>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">类型 <span class="request-tips">*</span></label>
                <div class="layui-input-inline">
                    <select name="type" >
                        <option value="1" {eq name="$quest.type" value="1"}selected{/eq}>单选</option>
                        <option value="2" {eq name="$quest.type" value="2"}selected{/eq}>多选</option>
                        <option value="3" {eq name="$quest.type" value="3"}selected{/eq}>判断</option>
                        <option value="4" {eq name="$quest.type" value="4"}selected{/eq}>简答</option>
                    </select>
                </div>
                <label class="layui-form-label">栏目 <span class="request-tips">*</span></label>
                <div class="layui-input-inline">
                    <select name="category_id" >
                        {volist name='cateList' id='v'}
                        <option value="{$v.id}" {eq name="$quest.category_id" value="$v.id"}selected{/eq}>{$v.name}</option>
                        {/volist}
                    </select>
                </div>
                <label class="layui-form-label">科目 <span class="request-tips">*</span></label>
                <div class="layui-input-inline">
                    <select name="subject_id" >
                        {volist name='subjectList' id='v'}
                        <option value="{$v.id}" {eq name="$quest.subject_id" value="$v.id"}selected{/eq}>{$v.name}</option>
                        {/volist}
                    </select>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">分值 <span class="request-tips">*</span></label>
                <div class="layui-input-inline">
                    <input type="text" class="layui-input" name="score" value="{$ques.score|default='0.1'}">
                </div>
                <label class="layui-form-label">选项答案 <span class="request-tips">*</span></label>
                <div class="layui-input-inline">
                    <input type="text" class="layui-input" name="answer" value="{$quest.answer}" >
                </div>
                <div class="layui-text">多个请用英文“,”隔开</div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <input type="hidden" name="id" value="{$quest.id}">
                    {if $paperId}
                    <input type="hidden" name="paper_id" value="{$paperId}">
                    {/if}
                    <div class="layui-text">带 * 号的为必填项</div>
                    <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                    <a href="javascript:history.go(-1);" class="layui-btn layui-btn-primary" >返回</a>
                </div>
            </div>
        </form>
    </div>
</div>
